home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / File.Type.Notes / FTN.B6.XXXX < prev    next >
Encoding:
Text File  |  1990-07-27  |  2.7 KB  |  56 lines  |  [04] ASCII Text (0x0000)

  1. Apple II
  2. File Type Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. File Type:         $B6 (182)
  7. Auxiliary Type:    All
  8.  
  9. Full Name:     ProDOS 16 or GS/OS Permanent Initialization File
  10. Short Name:    Permanent initialization file
  11.  
  12. Written by:    Matt Deatherage                                 September 1990
  13.  
  14. Files of this type contain initialization code that does not get unloaded.
  15. _____________________________________________________________________________
  16.  
  17. Files of type $B6 contain permanent initialization code in OMF format.  Such 
  18. files are often referred to as "inits."  They are loaded by GS/OS at boot time 
  19. and are never unloaded.  The auxiliary type is reserved except for bit 15--if 
  20. bit 15 is set, the initialization file is not loaded at boot time.
  21.  
  22. The structure of an init is similar to that of an application.  The first byte 
  23. of the loaded code image (inits are load files) is the entry point, and the 
  24. init must end with an RTL instruction.  When GS/OS transfers control to a 
  25. permanent initialization file, the processor is in 16-bit native mode.  The A 
  26. register contains the init's user ID, D points to the bottom of a 4K stack and 
  27. direct-page area and S points to near the top of that area.  (If the init has 
  28. an OMF stack and direct page segment linked in, the D and S registers point to 
  29. it instead.)  The data bank register is not defined; you should save it, set 
  30. it and restore it if you use absolute addressing.
  31.  
  32. Permanent inits are called at boot time and left in memory until the system is 
  33. shut down.  However, GS/OS does not call them again (even on a return from 
  34. ProDOS 8).  If your permanent init wants to periodically get control, it can 
  35. use features like heartbeat tasks (installed with SetHeartBeat and IntSource), 
  36. GS/OS notification procedures (AddNotifyProc), or Run Queue tasks (AddToRunQ).
  37.  
  38. There is a mechanism your permanent init can use to tell GS/OS that it should 
  39. be unloaded.  Above GS/OS's RTL address on the stack is a Word value of $0000.  
  40. If your init sets bit zero of this word (LDA #1, STA 4,S assuming you haven't 
  41. pushed anything on the stack), GS/OS unloads your init when you return 
  42. control, treating it as if it were a temporary init file.  This can be useful 
  43. for inits that operate with certain hardware--if the hardware isn't present, 
  44. the init can go away.
  45.  
  46. Warning:  This Word space is not available to permanent initialization 
  47.           files that execute from a user's folder on an AppleShare 
  48.           file server at boot time.
  49.  
  50.  
  51. Further Reference
  52. _____________________________________________________________________________
  53.   o  GS/OS Reference
  54.   o  File Type Note for File Type $B7, Temporary Initialization Files
  55.  
  56.